package cn.edu.lsnu.mbti.controller;

import cn.edu.lsnu.mbti.common.R;
import cn.edu.lsnu.mbti.entity.Type;
import cn.edu.lsnu.mbti.service.TypeService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("type")
public class TypeController {

    @Resource
    private TypeService typeService;


    @GetMapping("list")
    public R<List<Type>> list(){
        return R.success(typeService.queryTypeList());
    }
}
